package cn.com.bluemoon.daps.model.vo;

import cn.com.bluemoon.daps.common.domain.UserPermissionApi;
import cn.com.bluemoon.daps.model.entity.DapDataModelTablePartition;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import java.io.Serializable;
import java.util.List;

@Data
public class InsertModelTablePartitionVo implements UserPermissionApi {

    @Valid
    @ApiModelProperty(value = "分区列表")
    private List<DapDataModelTablePartition> partitions;

    @Override
    public Serializable getUserPermissionKeyValue() {
        return partitions.get(0).getDataModelId();
    }
}
